Node-RED block in Snap4City Microservice library node-red-contrib-snap4city-user is "tpl-routes-by-line">

provide a list of the public transport routes available for a given agency, line or passing by a specific stop.

Inputs

A JSON with these parameters:
agency string
URI of the agency whose lines are to be retrieved
line string
URI or shortName of a line (if URI is provided the agency is not needed)

Outputs

It provides an array of JSON objects of the routes available, for each route is provided: • line: line shot name • route: the route URI • routeName: optional route name • wktGeometry: the WKT geometry of the route • firstBusStop: name of the first bus stop • lastBusStop: name of the last bus stop

Details

The node can receive a JSON with the parameters described in the Inputs section and with them generate the output JSON. If the values are not present in the input JSON, these are read by those in the configuration. If they are not present in either part, an error is generated for the necessary parameters.